home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / win / ch24 / 24fig05.wrl < prev    next >
Text File  |  1996-09-23  |  2KB  |  77 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Origin marker
  8.         Shape {
  9.             appearance Appearance {
  10.                 material Material {
  11.                     diffuseColor 0.0 0.0 0.0
  12.                     emissiveColor 0.0 1.0 1.0
  13.                 }
  14.             }
  15.             geometry Sphere { radius 0.5 }
  16.         },
  17.     # Sound emitter 1
  18.         DEF Emitter1 Transform {
  19.             translation 5.0 0.0 0.0
  20.             center -5.0 0.0 0.0
  21.             children [
  22.                 Sound {
  23.                     source AudioClip {
  24.                         url "willow1.wav"
  25.                         loop TRUE
  26.                     }
  27.                     intensity 0.5
  28.                     minFront 5.0
  29.                     minBack  5.0
  30.                     maxFront 10.0
  31.                     maxBack  10.0
  32.                 },
  33.                 DEF SoundMarker Inline { url "sndmark.wrl" }
  34.             ]
  35.         },
  36.         DEF Emitter1Clock TimeSensor {
  37.             cycleInterval 15.0
  38.             loop TRUE
  39.         },
  40.         DEF Emitter1Path OrientationInterpolator {
  41.             key [ 0.0, 0.5, 1.0 ]
  42.             keyValue [ 0.0 1.0 0.0 0.0, 0.0 1.0 0.0 3.14, 0.0 1.0 0.0 6.28 ]
  43.         },
  44.     # Sound emitter 2
  45.         DEF Emitter2 Transform {
  46.             translation -5.0 0.0 0.0
  47.             center 5.0 0.0 0.0
  48.             children [
  49.                 Sound {
  50.                     source AudioClip {
  51.                         url "drone1.wav"
  52.                         loop TRUE
  53.                     }
  54.                     intensity 0.5
  55.                     minFront 5.0
  56.                     minBack  5.0
  57.                     maxFront 10.0
  58.                     maxBack  10.0
  59.                 },
  60.                 USE SoundMarker
  61.             ]
  62.         },
  63.         DEF Emitter2Clock TimeSensor {
  64.             cycleInterval 7.0
  65.             loop TRUE
  66.         },
  67.         DEF Emitter2Path OrientationInterpolator {
  68.             key [ 0.0, 0.5, 1.0 ]
  69.             keyValue [ 0.0 1.0 0.0 0.0, 0.0 1.0 0.0 3.14, 0.0 1.0 0.0 6.28 ]
  70.         },
  71.     ]
  72. }
  73. ROUTE Emitter1Clock.fraction_changed TO Emitter1Path.set_fraction
  74. ROUTE Emitter2Clock.fraction_changed TO Emitter2Path.set_fraction
  75. ROUTE Emitter1Path.value_changed     TO Emitter1.set_rotation
  76. ROUTE Emitter2Path.value_changed     TO Emitter2.set_rotation
  77.